Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-34468][Connector/Cassandra] Adding support for Flink 1.20 #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HuangZhenQiu
Copy link

Bump Flink version to 1.20.0 to prepare support lineage in Cassandra connector

Copy link

boring-cyborg bot commented Aug 11, 2024

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

@HuangZhenQiu HuangZhenQiu changed the title [FLINK-34468] bump flink version to 1.20.0 [FLINK-34468][Connector/Cassandra] Adding support for Flink 1.20 Aug 21, 2024
Copy link
Contributor

@echauchot echauchot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. I finally looked at this PR

Comment on lines +28 to +30
flink: [ 1.20.0 ]
include:
- flink: 1.19.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule is the test the connector with the last 2 major Flink versions so 1.20.0 and 1.19.1. And for readability I think this it is better to use the matrix
flink: [1.20.0, 1.19.1]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you just updated the github action job that reacts to PR pushes. But you need to update the weekly.yml file which is the main job running every sunday

In this file I'd test released (v3.2) branch against last 2 snapshots of flink (to check that ongoing iterations of flink to not break released version of the connector) and the main branch against last 2 relesed versions of flink (to check that the current iteration of the connector still works on released flink versions)

@@ -1,10 +1,4 @@
Constructor <org.apache.flink.connector.cassandra.source.CassandraSource.<init>(org.apache.flink.streaming.connectors.cassandra.ClusterBuilder, long, java.lang.Class, java.lang.String, org.apache.flink.streaming.connectors.cassandra.MapperOptions)> calls method <org.apache.flink.api.java.ClosureCleaner.clean(java.lang.Object, org.apache.flink.api.common.ExecutionConfig$ClosureCleanerLevel, boolean)> in (CassandraSource.java:138)
Constructor <org.apache.flink.connector.cassandra.source.CassandraSource.<init>(org.apache.flink.streaming.connectors.cassandra.ClusterBuilder, long, java.lang.Class, java.lang.String, org.apache.flink.streaming.connectors.cassandra.MapperOptions)> calls method <org.apache.flink.util.Preconditions.checkNotNull(java.lang.Object, java.lang.String)> in (CassandraSource.java:124)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These archunit violations were legitimate to store in the violation store as they are accepted. Now that you removed them you have build issues.
Take a look at the comments in file archunit.properties to see how to use it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the same reason as I removed WriteAheadSinkTestBase as the base class of CassandraConnectorITCase.

extends WriteAheadSinkTestBase<
Tuple3<String, Integer, Integer>,
CassandraTupleWriteAheadSink<Tuple3<String, Integer, Integer>>> {
class CassandraConnectorITCase {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove this inheritance otherwise you no more test what's in WriteAheadSinkTestBase

@@ -197,36 +196,31 @@ protected void checkResultWithSemantic(
}

@Disabled("Not a unbounded source")
@Override
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer keeping the overrides as these methods are indeed defined in the parent class even though they are disabled because related to streaming source

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I guess it is auto removed after removing WriteAheadSinkTestBase as base class.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these methods come from the source base test suite.

@@ -284,7 +280,6 @@ void testAnnotatePojoWithTable() {
// Exactly-once Tests
// ------------------------------------------------------------------------

@Override
protected CassandraTupleWriteAheadSink<Tuple3<String, Integer, Integer>> createSink()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and keep the overrides.

@@ -42,7 +42,7 @@ under the License.
</scm>

<properties>
<flink.version>1.18.0</flink.version>
<flink.version>1.20.0</flink.version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you also need to fix the depencies convergence issues with 1.20.0

Dependency convergence error for org.apache.commons:commons-lang3:3.12.0 paths to dependency are:
+-org.apache.flink:flink-connector-cassandra_2.12:4.0-SNAPSHOT
  +-org.apache.flink:flink-streaming-java:1.20.0
    +-org.apache.flink:flink-core:1.20.0
      +-org.apache.commons:commons-lang3:3.12.0
and
+-org.apache.flink:flink-connector-cassandra_2.12:4.0-SNAPSHOT
  +-org.apache.flink:flink-streaming-java:1.20.0
    +-org.apache.flink:flink-core:1.20.0
      +-org.apache.commons:commons-text:1.10.0
        +-org.apache.commons:commons-lang3:3.12.0
and
+-org.apache.flink:flink-connector-cassandra_2.12:4.0-SNAPSHOT
  +-org.apache.flink:flink-streaming-java:1.20.0
    +-org.apache.flink:flink-core:1.20.0
      +-org.apache.commons:commons-compress:1.26.0
        +-org.apache.commons:commons-lang3:3.14.0
and
+-org.apache.flink:flink-connector-cassandra_2.12:4.0-SNAPSHOT
  +-org.apache.flink:flink-streaming-java:1.20.0
    +-org.apache.flink:flink-runtime:1.20.0
      +-org.apache.commons:commons-lang3:3.12.0
and
+-org.apache.flink:flink-connector-cassandra_2.12:4.0-SNAPSHOT
  +-org.apache.flink:flink-streaming-java:1.20.0
    +-org.apache.flink:flink-java:1.20.0
      +-org.apache.commons:commons-lang3:3.12.0
and
+-org.apache.flink:flink-connector-cassandra_2.12:4.0-SNAPSHOT
  +-org.apache.flink:flink-test-utils:1.20.0
    +-org.apache.flink:flink-runtime:1.20.0
      +-org.apache.commons:commons-lang3:3.12.0
and
+-org.apache.flink:flink-connector-cassandra_2.12:4.0-SNAPSHOT
  +-org.apache.flink:flink-test-utils:1.20.0
    +-org.apache.flink:flink-core:1.20.0
      +-org.apache.commons:commons-lang3:3.12.0

@HuangZhenQiu
Copy link
Author

HuangZhenQiu commented Oct 1, 2024

@echauchot
Thanks for the review. The major reason of removing WriteAheadSinkTestBase as the base class of CassandraConnectorITCase is WriteAheadSinkTestBase is no more accessible out side of the package "org.apache.flink.streaming.runtime.operators".

Shall I remove the CassandraConnectorITCase to package namespace org.apache.flink.streaming.runtime.operators?

@echauchot
Copy link
Contributor

@echauchot Thanks for the review. The major reason of removing WriteAheadSinkTestBase as the base class of CassandraConnectorITCase is WriteAheadSinkTestBase is no more accessible out side of the package "org.apache.flink.streaming.runtime.operators".

Shall I remove the CassandraConnectorITCase to package namespace org.apache.flink.streaming.runtime.operators?

no I don't think the cassandra test should be moved to a flink core namespace. It looks strange to me that the visibility of WriteAheadSinkTestBase was reduced as part of the migration to Junit 5, so I commented in the ticket were the change was made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants